let newsData = [
  { id: 10001, title: '新闻一', isHot: true, content: '内容一积极响应' },
  { id: 10002, title: '新闻二', isHot: false, content: '内容二' },
  { id: 10003, title: '新闻三', isHot: true, content: '内容三' },
  { id: 10004, title: '新闻四', isHot: false, content: '内容四' },
  { id: 10005, title: '新闻五', isHot: true, content: '内容五' },
]

let hotArr = []
let notHotArr = []
let idEle,tempTitle,tempIndex,special
for (let i = 0; i < newsData.length; i++) {
    let ele = newsData[i];
    ele.isHot ? hotArr.push(ele) : notHotArr.push(ele.title)//问题1与问题4
    if (ele.id == 10004) idEle = i//问题2
    //问题3
    if (ele.id == 10003) tempIndex = i
    if (ele.id == 10005) tempTitle = ele.title
    if (tempTitle!=undefined&&tempIndex!=undefined)newsData[tempIndex].title = tempTitle
    //问题5
    if (ele.isHot && ele.content.length > 5) special = ele
    //问题6
    console.log(`
        第${i+1}条新闻的信息是: 
            id为：${ele.id}
            title为：${ele.title}
            该条新闻`+ (ele.isHot ? `是` : `不是`) +`热点
            内容是：${ele.content}
    `);
}

//信息输出
console.log(`
    id为10004的新闻,下标为${idEle}
    既是热点新闻并且新闻内容长度大于5的新闻为：${special.title}
`);
let str = `
    非热点新闻有：`
for (let i = 0;i < notHotArr.length;i++) {
       str += notHotArr[i]+` `
}
console.log(str);